<template>
    <page-wrap :show-top="false" :title="title" bgColor="#fff" back hideTab>
        <view class="wrapper">
            <web-view :webview-styles="webviewStyles" :src="srcWebView"></web-view>
        </view>
    </page-wrap>
</template>
<script>
export default {
    props: {
    },
    data() {
        return {
            webviewStyles: {
                progress: {
                    color: '#FF3333'
                }
            },
            personId: uni.getStorageSync("person-id").slice(2) || "",
            id: '',
            title: '',
            srcWebView: '',


            //http://yl1001-video.yl1001.com/uploads/ios/2022/11/30/2G6Z7XW130L281ZNW8VH1BHN0U8BZ115_cf.mp4?_upt=475d674b1687571862
            //srcWebView: "https://yl1001-video.yl1001.com/uploads/ios/2022/11/30/2G6Z7XW130L281ZNW8VH1BHN0U8BZ115_cf.mp4?_upt=475d674b1687571862"

            // srcWebView:"https://m.yl1001.com/community/web/v1/html/consult/index.html#/shortvideo?sharePersonId="+this.personId+"&articleId="+this.id,
            //http://m.yl1001.com/community/web/v1/html/consult/index.html#/shortvideo?sharePersonId=24384836&articleId=2241679303390688
            //https://yl1001-video.yl1001.com/uploads/20230320/ds6vzs0e3crwrbsvdbvdlpu8y99rfvj3_cf.mp4?_upt=402628301687568322
            // srcWebView:"https://yl1001-video.yl1001.com/uploads/20230320/ds6vzs0e3crwrbsvdbvdlpu8y99rfvj3_cf.mp4?_upt=402628301687568322"
        }
    },
    onLoad: function (option) {
        console.log(option);
        this.personId = option.sharePersonId;
        this.id = option.articleId;
        this.title = option.title;
        console.log(this.title);
        this.srcWebView = decodeURIComponent(option.videoSrc).replace("http://", "https://");
        // this.srcWebView = "https://m.yl1001.com/community/web/v1/html/consult/index.html#/shortvideo?sharePersonId="+this.personId+"&articleId="+this.id;
        console.log(this.srcWebView);
        uni.setNavigationBarTitle({
            title: this.title
        })
    },
    methods: {

    },
    watch: {

    }
};
</script>
<style lang="scss" scoped>
.wrapper {
    min-height: 100vh;
}
</style>